package com.kaifamiao.demo.d0805;

public class A {

    private int a;

    public int aa;

    private static int aaa;




    // 访问修饰符可以是任意的
    public class B extends Demo{

        private int b;

        public int bb = aa;

        private String a;

        public void show(int a){
            // A.this 表示 外部类 A 的 this 对象
            this.b = 1;
            a = 1; // 局部变量 a
            this.a = "1"; // 内部类的 a
            A.this.a = 2; // 外部类的 a
            A.this.aa = 2;
        }

        public static void test(int a){
            a = 1;
        }
    }

    // 静态内部类
    public static class C {
        private static int c;
        private int cc;
        public int ccc;

        public static int cccc;

        public void show(int c){
//            a = 1;
//            aa = 2;
            aaa = 3;
        }

        public static void test(){

        }
    }

    public void show(){
        B b = new B();
        b.b = 1; // private
        b.bb = 2;

        C c = new C();
        c.cc = 1; // private
        c.ccc = 2;

        C.c = 1;
        B.test(1);
        C.test();
    }
}
